
# generate figure E4

# load packages
library(rio) # load data
library(tidyverse) # data manipulation
library(ggpubr) # combine different plots

# set working directory
setwd("~/replication_files/")

# call R file that estimates models 
source("16_generate_tabE1.R")
# note that you need to change the working directory in the source file as well

plot9 <- plot(fect1, main = "(a) Treatment: Consultation Promotes Natural Resource Governance", 
              ylab = "Effect on the Probability of Policy Passage",
              xlab = "Years Since Treatment Began", cex.main = 0.8, cex.lab = 0.8, 
              cex.axis = 0.8, proportion = 0.05, show.point = TRUE, xlim = c(-2,3), ylim = c(-0.2,0.25)) + theme_classic() +
  theme(plot.title = element_text(face="bold")) 

plot10 <- plot(fect2, main = "(b) Treatment: Consultation Uses Natural Resource Terms", 
              ylab = "Effect on the Probability of Policy Passage", 
              xlab = "Years Since Treatment Began", cex.main = 0.8, cex.lab = 0.8, 
              cex.axis = 0.8, proportion = 0.05, show.point = TRUE, xlim = c(-2,3), ylim = c(-0.2,0.25)) + theme_classic() +
  theme(plot.title = element_text(face="bold"))

ggarrange(plot9,plot10, ncol = 2) %>%
  ggexport(filename = "figures/figE4.pdf", width = 14, height = 5)
